package com.ikun.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ikun.dao.ComplaintsDao;
import com.ikun.entity.Complaints;
import com.ikun.service.ComplaintsService;

@Service
public class ComplaintsServiceImpl implements ComplaintsService {

    @Autowired
    private ComplaintsDao complaintsDao;

    @Override
    public List<Complaints> findAllComplaints() {
        return complaintsDao.findAllComplaints();
    }

    @Override
    public List<Complaints> findByContent(String keyword) {
        return complaintsDao.findByContent(keyword);
    }

    @Override
    public String addComplaints(Complaints complaints) {
        return complaintsDao.addComplaints(complaints) > 0 ? "提交成功" : "提交失败";
    }

    // @Override
    // public List<Complaints> findBysubmit() {
    // return null;
    //
    // }
}
